package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.AppDynamicMsg;
import com.ruoyi.system.mapper.AppDynamicMsgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AppDitchMapper;
import com.ruoyi.system.domain.AppDitch;
import com.ruoyi.system.service.IAppDitchService;

/**
 * 用户邀请渠道信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-06
 */
@Service
public class AppDitchServiceImpl extends ServiceImpl<AppDitchMapper, AppDitch>  implements IAppDitchService
{
    @Autowired
    private AppDitchMapper appDitchMapper;

    /**
     * 查询用户邀请渠道信息
     * 
     * @param id 用户邀请渠道信息主键
     * @return 用户邀请渠道信息
     */
    @Override
    public AppDitch selectAppDitchById(Long id)
    {
        return appDitchMapper.selectAppDitchById(id);
    }

    /**
     * 查询用户邀请渠道信息列表
     * 
     * @param appDitch 用户邀请渠道信息
     * @return 用户邀请渠道信息
     */
    @Override
    public List<AppDitch> selectAppDitchList(AppDitch appDitch)
    {
        return appDitchMapper.selectAppDitchList(appDitch);
    }

    /**
     * 新增用户邀请渠道信息
     * 
     * @param appDitch 用户邀请渠道信息
     * @return 结果
     */
    @Override
    public int insertAppDitch(AppDitch appDitch)
    {
        appDitch.setCreateTime(DateUtils.getNowDate());
        return appDitchMapper.insertAppDitch(appDitch);
    }

    /**
     * 修改用户邀请渠道信息
     * 
     * @param appDitch 用户邀请渠道信息
     * @return 结果
     */
    @Override
    public int updateAppDitch(AppDitch appDitch)
    {
        return appDitchMapper.updateAppDitch(appDitch);
    }

    /**
     * 批量删除用户邀请渠道信息
     * 
     * @param ids 需要删除的用户邀请渠道信息主键
     * @return 结果
     */
    @Override
    public int deleteAppDitchByIds(Long[] ids)
    {
        return appDitchMapper.deleteAppDitchByIds(ids);
    }

    /**
     * 删除用户邀请渠道信息信息
     * 
     * @param id 用户邀请渠道信息主键
     * @return 结果
     */
    @Override
    public int deleteAppDitchById(Long id)
    {
        return appDitchMapper.deleteAppDitchById(id);
    }
}
